#include<stdio.h>

int main()
{
    int n, m = 0;
    scanf("%d", &n);
    for (int i = n; n != 0; n /= 10)
    {
        m = m * 10 + n % 10;
    }
    printf("%d\n", m);
    return 0;
}